package org.linlinjava.litemall.wx.service;

import com.github.pagehelper.Page;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.linlinjava.litemall.db.domain.LitemallWithdraw;
import org.linlinjava.litemall.db.service.LitemallWithdrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WxUserWithdrawService {
    private final Log logger = LogFactory.getLog(WxUserWithdrawService.class);

    @Autowired
    private LitemallWithdrawService withdrawService;

    public Page<LitemallWithdraw> queryList(Integer userId, Integer page, Integer size) {
        return queryList(userId,page, size, "add_time", "desc");
    }


    public Page<LitemallWithdraw> queryList(Integer userId, Integer page, Integer size, String sort, String order) {
        Page<LitemallWithdraw> grouponRulesList = (Page<LitemallWithdraw>)withdrawService.queryList(userId, page, size, sort, order);
        return grouponRulesList;
    }

    public void saveWithdraw(LitemallWithdraw withdraw) {
        withdrawService.saveWithdraw(withdraw);
    }
}
